/**
 *  
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 */
package com.aboverock.common.constant;

import java.text.SimpleDateFormat;

/**
 * 系统使用的静态变量.
 * 
 * @author Rock Wang
 * @since 1.0.0
 */
public class KbsmartConstant {

    /**
     * The Class static DateFormat.
     *
     */
    public static class DateFormat {

        /** The Constant SHORT_DATE_FORMAT:yyyy-MM-dd */
        public static final String SHORT_DATE_FORMAT = "yyyy-MM-dd";

        /** The Constant LONG_DATE_FORMAT:yyyy-MM-dd HH:mm:ss. */
        public static final String LONG_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";

        /** The Constant TIMESTAMP_DATE_FORMAT:yyyy-MM-dd HH:mm:ss.S. */
        public static final String LONG_DATE_MILLISECOND_FORMAT = "yyyy-MM-dd HH:mm:ss.S";

        /** The Constant LONG_DATE_SLASH_FORMAT:MM/dd/yyyy hh:mm:ss a. */
        public static final String LONG_DATE_SLASH_12_FORMAT = "MM/dd/yyyy hh:mm:ss a";

        /** The Constant LONG_DATE_SLASH_FORMAT:MM/dd/yyyy hh:mm:ss a. */
        public static final String LONG_DATE_SLASH_24_FORMAT = "MM/dd/yyyy HH:mm:ss";

        /** The Constant TIME_FORMAT:HH:mm:ss. */
        public static final String TIME_FORMAT = "HH:mm:ss";

        /** The Constant TIME_FORMAT:HH:mm:ss.S. */
        public static final String TIME_MILLISECOND_FORMAT = "HH:mm:ss.S";

        /**
         * New simple date format.
         *
         * @param dateFormat the date format
         * @return the simple date format
         */
        public static SimpleDateFormat newDateFormat(String dateFormat) {
            return new SimpleDateFormat(dateFormat);
        }

    }

    /**
     * 对应Spring Profile配置名称, profile配置 以此为准.
     *
     */
    public static class Profile {

        /** 开发profile, "dev". */
        public static final String DEVLOPMENT = "dev";

        /** 测试profile, "test". */
        public static final String TEST = "test";

        /** 测试profile, "qa". */
        public static final String QUALITY_ASSURANCE = "qa";

        /** UAT profile, "uat". */
        public static final String USER_ACCEPTANCE_TEST = "uat";

        /** 生产profile, "prod". */
        public static final String PRODUCTION = "prod";

    }

    /**
     * 分页属性类常量.
     *
     * @author Rock Wang
     */
    public static class Pagination {

        /** 默认起始页码. */
        public static final int CURRENT_PAGE_DEFAULT = 1;

        /** 默认每页数据条数. */
        public static final int PAGE_SIZE_DEFAULT = 10;

        /** 前端传递页码参数名称. */
        public static final String CURRNET_PARA_NAME = "current";

        /** 前端传递每页条数参数名称. */
        public static final String PAGE_SIZE_PARA_NAME = "pageSize";

        /** 前端传递排序参数名称. */
        public static final String SORT_PARA_NAME = "sort";
    }
}
